package com.xuelianx.encryptlib;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;


public class MD5Util {
    public static String getMD5(String strSource) {
        MessageDigest md5 = null;
        try {
            md5 = MessageDigest.getInstance("MD5Util");
            md5.update(strSource.getBytes());
            byte[] m = md5.digest();
            return ByteAction.toHex(m).toLowerCase();
        } catch (NoSuchAlgorithmException e) {
        }
        return "";
    }
}
